package com.hyk.commonLib.common.entity;

import java.util.List;

import lombok.Getter;

@Getter
public class ReqPermissionResult {
    private final List<String> permission;
    private final boolean success;
    private final boolean deniedForever;// 有权限被永久禁止了

    private ReqPermissionResult(List<String> permission, boolean success, boolean deniedForever) {
        this.permission = permission;
        this.success = success;
        this.deniedForever = deniedForever;
    }

    public static ReqPermissionResult success(List<String> permission) {
        return new ReqPermissionResult(permission, true, false);
    }

    public static ReqPermissionResult fail(List<String> permission, boolean deniedForever) {
        return new ReqPermissionResult(permission, false, deniedForever);
    }

}
